//**********************************************************************************
//  PP3_3.java         Author:Tang Caiming
//
//  Write a program that generates and outputs a random phone number of a
//  XXX-XXX-XXXX type, including the connection line.The first three Numbers 
//  can't have eight or nine, and the middle three Numbers can't be more than 655.
//  Tip: consider the simplest way to generate a phone number without having to
//  determine each number individually.
//**********************************************************************************

import java.util.*;

public class PP3_3
{
   public static void main(String[] args)
   {
      Random num = new Random();

      int num1,num2,num3,num4,num5;
 
      num1 = num.nextInt(8);
      num2 = num.nextInt(8);
      num3 = num.nextInt(8);
      num4 = num.nextInt(556) + 100;
      num5 = num.nextInt(9000) + 1000;

      System.out.println("Tel= " + num1 + num2 + num3 + "-" + num4 + "-" + num5);

   }
}
